#include <iostream>
using namespace std; 

void swap(int& x , int& y)
{
  int temp = x;
  x = y;
  y = temp;
}

void swap2(int& x , int& y)
{
   x = x + y;
   y = x - y;
   x = x - y;
}

void swap3(int& x , int& y)
{
  x = x ^ y;
  y = x ^ y;
  x = x ^ y;
}

int main()
{
  int a = 10;
  int b = 20;
  swap3(a , b);

  cout << "a: " << a << endl;
  cout << "b: " << b << endl;
  return 0;
}
